package com.ag.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 * TbEventCleanup entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_EVENT_CLEANUP", schema = "dbo", catalog = "AGDB")
public class TbEventCleanup implements java.io.Serializable {

	// Fields

	private String ecId;
	private TbUser tbUser;
	private TbEvent tbEvent;
	private Date ecTime;
	private String ecContent;
	private String a;
	private String b;
	private String c;
	private Set<TbEventCleanupAttach> tbEventCleanupAttachs = new HashSet<TbEventCleanupAttach>(
			0);

	// Constructors

	/** default constructor */
	public TbEventCleanup() {
	}

	/** full constructor */
	public TbEventCleanup(TbUser tbUser, TbEvent tbEvent, Date ecTime,
			String ecContent, String a, String b, String c,
			Set<TbEventCleanupAttach> tbEventCleanupAttachs) {
		this.tbUser = tbUser;
		this.tbEvent = tbEvent;
		this.ecTime = ecTime;
		this.ecContent = ecContent;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbEventCleanupAttachs = tbEventCleanupAttachs;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "EC_ID", unique = true, nullable = false, length = 32)
	public String getEcId() {
		return this.ecId;
	}

	public void setEcId(String ecId) {
		this.ecId = ecId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "U_ID")
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "E_ID")
	public TbEvent getTbEvent() {
		return this.tbEvent;
	}

	public void setTbEvent(TbEvent tbEvent) {
		this.tbEvent = tbEvent;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EC_TIME", length = 23)
	public Date getEcTime() {
		return this.ecTime;
	}

	public void setEcTime(Date ecTime) {
		this.ecTime = ecTime;
	}

	@Column(name = "EC_CONTENT", length = 4000)
	public String getEcContent() {
		return this.ecContent;
	}

	public void setEcContent(String ecContent) {
		this.ecContent = ecContent;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEventCleanup")
	public Set<TbEventCleanupAttach> getTbEventCleanupAttachs() {
		return this.tbEventCleanupAttachs;
	}

	public void setTbEventCleanupAttachs(
			Set<TbEventCleanupAttach> tbEventCleanupAttachs) {
		this.tbEventCleanupAttachs = tbEventCleanupAttachs;
	}

}